//
//  ContainerHeader.m
//  收纳
//
//  Created by  on 2022/10/28.
//

#import "ContainerHeader.h"
@interface ContainerHeader()
@property (strong, nonatomic) IBOutlet UIImageView *img;
@property (strong, nonatomic) IBOutlet UIView *bgMiddleView;
@property (strong, nonatomic) IBOutlet UILabel *name;
@property (strong, nonatomic) IBOutlet UILabel *money;
@property (strong, nonatomic) IBOutlet UILabel *type;
@property (strong, nonatomic) IBOutlet UILabel *date;

@end
@implementation ContainerHeader

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (IBAction)actionForBtn:(UIButton *)sender {
    if (self.block) {
        self.block(sender.tag);
    }
}
- (void)setModel:(Goods *)model{
    _model = model;
    self.img.image = [UIImage imageWithData:model.imgs[0]];
    self.name.text =  model.name;
    self.money.text = model.money;
    self.date.text = [NSDate transToDate:@"yyyy-MM-dd HH:mm:ss" :model.stamp];
}
@end
